package thebesttaskmanager.inputparser;

import java.util.Date;

public class Command {
	private String cmd;
	private String text;
	private Date startDate;
	private Date endDate;

	/**
	 * constructor
	 */
	public Command() {

	}

	public Command(String cmd, String text) {
		this.cmd = cmd;
		this.text = text;
	}

	public Command(String cmd, String text, Date startDate, Date endDate) {
		this.cmd = cmd;
		this.text = text;
		this.startDate = startDate;
		this.endDate = endDate;
	}

	public Command(String cmd, String text, Date deadline) {
		this.cmd = cmd;
		this.text = text;
		this.endDate = deadline;
	}

	public boolean isFloating() {
		if (startDate == null && endDate == null) {
			return true;
		}
		return false;
	}

	public boolean isTimed() {
		if (startDate != null && endDate != null) {
			return true;
		}
		return false;
	}

	public boolean isDeadline() {
		if (startDate == null && endDate != null) {
			return true;
		}
		return false;
	}
	
	public void setCmd(String cmd) {
		this.cmd = cmd;
	}

	public void setText(String text) {
		this.text = text;
	}

	public void setStartDate(Date startDate) {
		this.startDate = startDate;
	}

	public void setEndDate(Date endDate) {
		this.endDate = endDate;
	}


	public Date getDeadline() {
		return endDate;
	}

	public Date getEndDate() {
		return endDate;
	}

	public Date getStartDate() {
		return startDate;
	}

	public String getText() {
		return text;
	}

	public String getCmd() {
		return cmd;
	}

	
}
